.class Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;
.super Lcom/sponsorpay/sdk/android/publisher/OfferWebClient;
.source "SPBrandEngageClient.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->getWebClient()Landroid/webkit/WebViewClient;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;


# direct methods
.method constructor <init>(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;Landroid/app/Activity;)V
    .locals 0
    .parameter
    .parameter "$anonymous0"

    .prologue
    .line 1
    iput-object p1, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    .line 542
    invoke-direct {p0, p2}, Lcom/sponsorpay/sdk/android/publisher/OfferWebClient;-><init>(Landroid/app/Activity;)V

    return-void
.end method


# virtual methods
.method protected getHostActivity()Landroid/app/Activity;
    .locals 1

    .prologue
    .line 598
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    #getter for: Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->mActivity:Landroid/app/Activity;
    invoke-static {v0}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->access$12(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;)Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method protected onPlayStoreNotFound()V
    .locals 2

    .prologue
    .line 581
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->ERROR_PLAY_STORE_UNAVAILABLE:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    invoke-static {v1}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;)Ljava/lang/String;

    move-result-object v1

    #calls: Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->showErrorDialog(Ljava/lang/String;)V
    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->access$2(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;Ljava/lang/String;)V

    .line 582
    return-void
.end method

.method public onReceivedError(Landroid/webkit/WebView;ILjava/lang/String;Ljava/lang/String;)V
    .locals 3
    .parameter "view"
    .parameter "errorCode"
    .parameter "description"
    .parameter "failingUrl"

    .prologue
    .line 567
    const-string v0, "SPBrandEngageClient"

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "onReceivedError url - "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " - "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/utils/SponsorPayLogger;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 569
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->MBE_ERROR_DIALOG_MESSAGE_DEFAULT:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    invoke-static {v1}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;)Ljava/lang/String;

    move-result-object v1

    #calls: Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->showErrorDialog(Ljava/lang/String;)V
    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->access$2(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;Ljava/lang/String;)V

    .line 570
    invoke-super {p0, p1, p2, p3, p4}, Lcom/sponsorpay/sdk/android/publisher/OfferWebClient;->onReceivedError(Landroid/webkit/WebView;ILjava/lang/String;Ljava/lang/String;)V

    .line 571
    return-void
.end method

.method protected onSponsorPayExitScheme(ILjava/lang/String;)V
    .locals 1
    .parameter "resultCode"
    .parameter "targetUrl"

    .prologue
    .line 586
    invoke-virtual {p0}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->getHostActivity()Landroid/app/Activity;

    move-result-object v0

    .line 588
    .local v0, hostActivity:Landroid/app/Activity;
    if-nez v0, :cond_0

    .line 594
    :goto_0
    return-void

    .line 592
    :cond_0
    invoke-virtual {v0, p1}, Landroid/app/Activity;->setResult(I)V

    .line 593
    invoke-virtual {p0, p2}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->launchActivityWithUrl(Ljava/lang/String;)Z

    goto :goto_0
.end method

.method protected onTargetActivityStart(Ljava/lang/String;)V
    .locals 2
    .parameter "targetUrl"

    .prologue
    .line 575
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    const-string v1, "USER_ENGAGED"

    #calls: Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->changeStatus(Ljava/lang/String;)V
    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->access$11(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;Ljava/lang/String;)V

    .line 576
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClientStatusListener$SPBrandEngageClientStatus;->PENDING_CLOSE:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClientStatusListener$SPBrandEngageClientStatus;

    #calls: Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->notifyListener(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClientStatusListener$SPBrandEngageClientStatus;)V
    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->access$5(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClientStatusListener$SPBrandEngageClientStatus;)V

    .line 577
    return-void
.end method

.method protected processSponsorPayScheme(Ljava/lang/String;Landroid/net/Uri;)V
    .locals 2
    .parameter "host"
    .parameter "uri"

    .prologue
    .line 556
    const-string v0, "requestOffers"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 557
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    .line 558
    const-string v1, "n"

    invoke-virtual {p2, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 557
    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    #calls: Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->processQueryOffersResponse(I)V
    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->access$10(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;I)V

    .line 562
    :cond_0
    :goto_0
    return-void

    .line 559
    :cond_1
    const-string v0, "start"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 560
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient$6;->this$0:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    const-string v1, "status"

    invoke-virtual {p2, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    #calls: Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->changeStatus(Ljava/lang/String;)V
    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->access$11(Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;Ljava/lang/String;)V

    goto :goto_0
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 2
    .parameter "view"
    .parameter "url"

    .prologue
    .line 546
    const-string v0, "youtube.com"

    invoke-virtual {p2, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 547
    const-string v0, "SPBrandEngageClient"

    const-string v1, "Preventin the opening of Youtube app"

    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/utils/SponsorPayLogger;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 548
    const/4 v0, 0x1

    .line 550
    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2}, Lcom/sponsorpay/sdk/android/publisher/OfferWebClient;->shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z

    move-result v0

    goto :goto_0
.end method
